/**
 * 
 */
define(function(require) {
	var comm = require('sdk/server');require('sdk/common');
	var param = appcan.ls.val('crossParam');
	if(param.split){
		param = JSON.parse(param);
	};
	
	if(!param || !param['url']){
		return appcan.window.openToast('webBrowser参数缺失',2000,5);
	};
	appcan.loading.show('加载中...',{
		wrap:'#View'
	});

	appcan.ready(function(){
		appcan.window.subscribe('webViewDone',function(msg){
			if(msg){
				appcan.loading.hide();
				$('#headTitle').text(param['title'] || param['url']);
			}
		});

		appcan.window.popoverElement({
			id: 'View',
			name: 'webView',
			url: param['url']
		});

	});
});